<%-- 
    Document   : index
    Created on : 10-jul-2012, 10:31:32
    Author     : Administrador
--%>
<%@page import="java.util.List"%>
<%@page import="com.javabeans.Carrera"%>
<%@page import="java.util.Calendar"%>
<%
    String s_path = request.getContextPath(); 
    Calendar s_now = Calendar.getInstance();
    String s_param = s_now.get(Calendar.YEAR)+","+s_now.get(Calendar.MONTH)+","+s_now.get(Calendar.DAY_OF_MONTH)+","+s_now.get(Calendar.HOUR_OF_DAY)+","+s_now.get(Calendar.MINUTE)+","+s_now.get(Calendar.SECOND)+","+s_now.get(Calendar.MILLISECOND);
    
    String msg = "";
    if( request.getAttribute("msg") != null ){
        msg = (String) request.getAttribute("msg");
    }
    
%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>SI-ESFM</title>
        <meta name="description" content="Derechos Reservados SI-ESFM" />
        <link rel="stylesheet" href="<%=s_path%>/css/styles.css" type="text/css" />
        <link rel="stylesheet" href="<%=s_path%>/css/menu/style.css" type="text/css" />
        <link rel="shortcut icon" href="<%=s_path%>/images/ico.png" type="image/png"/>
        <link rel="stylesheet" href="<%=s_path%>/css/qaptcha/QapTcha.jquery.css" type="text/css" />
        <script type="text/javascript" src="<%=s_path%>/js/md5.js"></script>
        <script type="text/javascript" src="<%=s_path%>/js/comun.js"></script>
        <script type="text/javascript" src="<%=s_path%>/js/jquery-1.7.2.min.js"></script>
        <script type="text/javascript" src="<%=s_path%>/js/validate/jquery.validate.min.js"></script>
        
        <script type="text/javascript">
            $(document).ready(function(){
                $("#login").focus();
                
                $("#formSesion").submit(function(){
                    encriptar("sw");
                });
                $("#formSesion").validate();
            });
            // para mostrar los menus dependiendo d q opcion fue clikado
            function menu(op){
                switch(parseInt(op,10)){
                    case 1:
                        location.href='<%=s_path%>/';
                        break;
                    case 2:
                        location.href='<%=s_path%>/web/index.jsp?tipo=2';
                        break;
                    case 3:
                        location.href='<%=s_path%>/web/index.jsp?tipo=3';
                        break;
                    case 4:
                        location.href='<%=s_path%>/web/index.jsp?tipo=4';
                        break;  
                    case 5:
                        location.href="<%=s_path%>/Foros?accion=1";
                        break;
                }
            }
            // actualizar la variable luego encriptarlo para cualquier submit
            function encriptar(val){
                hide = "";
                if( $.trim( $("#p"+val).val() ) != "" ){
                    hide = $.trim( $("#p"+val).val() );
                    $("#pp"+val).val( MD5(hide) );
                }
            }
        </script>
    </head>
    <body onload="showTime(<%=s_param%>)">
        <div id="top-wrap">
            <div id="header-wrap">
                <div id="header">
                    <h1><a href="index.html"><img src="<%=s_path%>/images/logo.png" alt="logo" height="46" width="190"></a></h1><!-- logo here -->
                    <div style="float: left;height:40px;position:relative; top:27px;">
                        <ul id="css3menu_top" class="topmenu">			
                            <li class="topfirst"><a href="javascript:menu(1)" title="Principal"><img src="<%=s_path%>/css/menu/home.png" alt="home.png"/>Principal</a></li>
                            <li class="topmenu"> <a href="javascript:menu(2)" title="Administrativos"><img src="<%=s_path%>/css/menu/admin.png" alt="admin.png"/>Administrativos</a></li>
                            <li class="topmenu"> <a href="javascript:menu(3)" title="Docentes"><img src="<%=s_path%>/css/menu/docente.png" alt="docente.png"/>Docentes</a></li>
                            <li class="topmenu"> <a href="javascript:menu(4)" title="Estudiantes"><span><img src="<%=s_path%>/css/menu/estudiante.png" alt="Demos"/>Estudiantes</span></a></li>
                            <li class="topmenu"> <a href="javascript:menu(5)" title="Comunidad"><img src="<%=s_path%>/css/menu/postulantes.png" alt="postulante.png"/>Foros</a></li>
                            <li class="toplast"> <a href="#" title="Ayuda"><img src="<%=s_path%>/css/menu/information.png" alt="ayuda"/>Ayuda</a></li>
                        </ul>
                        <p style="display:none"><a href="#">CAR Drop Down CSS Menu Css3.com</a></p><!-- CAR no aparece -->
                        <!--end of navigation-->
                    </div>
                </div>
            </div><!--header ends here-->
            <!-- cuerpo -->
            <div id="bodySpace">
                <!-- aqui va la ruta -->
                <div class="clearfix" id="middle" >
                    <!-- aqui va el arbol de entrada -->
                    <div id="breadcrumb"><!-- le da la forma de la imagen -->
                        <ul>
                            <li><a href="<%=s_path%>/">Home</a></li>
                            <li><span style="color:#666">Foros</span></li>
                            <li class="current-page"><span class="end"><span class="middle">Admin. Foro</span></span></li>
                        </ul>
                        <!-- para la hora -->
                        <div style="clear: both;position: absolute;text-align: right;width: 100%;"><span id="fechaServ"></span>&nbsp;&nbsp;<span id="horaServ" style=""></span>&nbsp;</div>
                    </div><!-- begin SIDEBAR FIRST -->
                </div>
                <div id="principal">
                    <!-- izquierda -->
                    <div class="cuerpo2" style="border: 0px solid">
                        <div class="izq" style="border: 0px solid">
                           <div id="menuprin">
                                <div class="menuIzqMarco">
                                    <div class="menu_css">
                                        <h3 class="title">Seleccione</h3>
                                        <div class="menu_selected menu_selectedDepen">
                                            <ul class="menuLogoNone">
                                                <li class = "pintar">
                                                    <span><a href="Foros?accion=16">Admin. Foro</a></span>
                                                    <span class="end"></span>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                           </div> 
                        </div>
                        <div class="der" style="border: 0px solid">
                            <div style="clear:left;text-align:center;" ><h2 style="color:#004080">Bienvenidos a la Administraci&oacute;n de la comunidad.</h2></div>
                            
                            
                            <form id="formSesion" method="post" action="Foros">
                                <input type="hidden" name="accion" value="17"/>
                                <input type="hidden" name="ppsw" id="ppsw" value="" />
                                
                                <div style="clear:left;text-align:center;" ><label for="idMsg" style="color:red;font-family: monospace;font-size: 14px"><%=msg.length()>0?msg:""%></label></div>
                                
                                <div style="clear:both;"><br/><br/>
                                    <label for="myCuenta" class="form_align30">Ingresar cuenta :</label>
                                    <input type="text" name="login" id="login" class="form_input_align required"/>
                                    <label class="error">*</label>
                                </div>
                                <div style="clear:both;"><br/>
                                    <label for="myPass" class="form_align30">Contrase&ntilde;a :</label>
                                    <input type="password" name="psw" id="psw" class="form_input_align required"/>
                                    <label class="error">*</label>
                                </div>
                                <div style="clear: both">
                                    <label class="form_align30">&nbsp;</label>
                                    <table border="0" style="float: left">
                                        <tr>
                                            <td style="text-align:right"><br/><input type="submit" value="Aceptar" title="Pulsa aqu&iacute; para iniciar." class="boton"/>&nbsp;&nbsp;</td>
                                            <td><br/>&nbsp;&nbsp;<input type="button" value="Cancelar" onclick="javascript:location.href='Foros?accion=1'" class="boton" title="Pulsa aqu&iacute; para cancelar."/></td>
                                        </tr>
                                    </table>
                                </div>
                            </form>
                        </div>
                    </div><!--end of leftPan-->
                </div>
            </div>
        </div>
    </body>
</html>
